package com.mycom.service.impl;

import com.mycom.dao.SubmitItemDao;
import com.mycom.pojo.SubmitItem;
import com.mycom.service.SubmitItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubmitItemServiceImpl implements SubmitItemService {
    @Autowired
    private SubmitItemDao submitItemDao;

    @Override
    public boolean save(SubmitItem submitItem) {
        return submitItemDao.save(submitItem) > 0 ? true : false;
    }

    @Override
    public List<SubmitItem> findByFormId(Integer formId) {
        return submitItemDao.findByFormId(formId);
    }
}
